import entity.Bus;
import pro.Dog;
import pro.Penguin;

import java.util.Scanner;

/**
 * @Description: TODO
 * @author: muxiongxiong
 * @date: 2021年07月01日 11:00
 * 公众号：雄雄的小课堂
 * 博客：https://blog.csdn.net/qq_34137397
 */
public class TestMain {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        test1();
    }

    /**
     * 测试狗狗的方法
     */
    public static void test1() {
        System.out.println("请输入你需要领养的宠物类型：1.狗 2.企鹅");
        int pettype = sc.nextInt();
        switch (pettype) {
            case 1:
                System.out.println("恭喜你，领养一只小狗");
                System.out.println("请输入小狗的名字");
                String name = sc.next();
                System.out.println("请输入品种：");
                String p = sc.next();
                Dog dog = new Dog();
                dog.name = name;    //名字
                dog.strain = p;     //品种
                //调用狗的方法
                dog.show();
                break;
            case 2:
                System.out.println("恭喜你，领养一只企鹅");
                System.out.println("请输入企鹅的名字");
                String qname = sc.next();
                System.out.println("请输入企鹅的性别：");
                String sex = sc.next();
                //创建企鹅的对象
                Penguin pen = new Penguin();
                pen.name = qname;
                pen.sex = sex;
                pen.show();
                break;
        }
    }


    public static void test2() {
        Bus bus = new Bus();
    }
}
